import java.io.Serializable

class Skills {

}

data class User(val name:String, val age: Int)

data class Triple<out A, out B, out C>(
    val first:A,
    val second:B,
    val third:C
) : Serializable {
    override fun toString(): String = "(${first}, ${second}, ${third})"
}

fun String.show() {
    println("balabala $this")
}




fun main(args: Array<String>){
    val jack = User(name = "Jack", age = 1)
    val olderJack = jack.copy(age = 2) //可以复制对象

    val (name, age) = olderJack
    println("${name}-${age}")

    val two: Pair<String, Int> = Pair("张三", 18)
    val three = Triple(22.3, "李四", true)
    println("${two.first}-${two.second}")
    println(three.toString())


    val list = listOf("apple", "banana")

    val maxLength = list.maxBy { it.length }
    println(maxLength)

    val turtor = "a new balabala"
    turtor.show()

    val st = "test CS1.6 + CS1.6 + CS1.6 = CS1.6 test"
    println( st.replaceLast(  "CS1.6", "CSGO" ) )
}